import React, { FC } from 'react'
import { IconProps, DISPLAY_NAME_ICON, getIconClassNames } from './config'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'

export const Icon: FC<IconProps> = props => {
  const { className, theme, ...restProps } = props
  const iconClasses = getIconClassNames(props)
  return (
    <FontAwesomeIcon className={iconClasses} {...restProps}></FontAwesomeIcon>
  )
}
Icon.displayName = DISPLAY_NAME_ICON

export default Icon
